<!--拆单配置-->
<div class='delivery-cfg-item'>
    <div class='tableform'>
        <div class="division">
            <table width="100%" cellspacing="0" cellpadding="0" border="0" class='delivery-cfg-table'>
                <tbody>
                <tr>
                    <th><{t}>是否启动拆单：<{/t}></th>
                    <td>
                        <input type="radio" value="0" class="delivery-cfg-delie" name="set[ome.order.split]" <{if $setData.ome_order_split != '1'}>checked="checked"<{/if}> ><label>关闭拆单</label>&nbsp;&nbsp;&nbsp;
                        <input type="radio" value="1" class="delivery-cfg-delie" name="set[ome.order.split]" <{if $setData.ome_order_split == '1'}>checked="checked"<{/if}> ><label>开启拆单</label>&nbsp;&nbsp;
                        <a target="_blank" href="index.php?app=ome&ctl=admin_operation_log&act=split_logs" style="color:#0066cc; text-decoration:none;" title="详细查看配置历史日志">(详细配置日志)</a>
                    </td>
                </tr>


                <tr id="show_split_setting" class="show_split_setting">
                    <th>&nbsp;</th>
                    <td>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="275" valign="top">
                                    <div id="split_type_1">
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">


                                            <tr>
                                                <td><strong>回写方式：</strong></td>
                                            </tr>

                                            <tr>
                                                <td>&nbsp;<input type="radio" name="set[ome.order.split_type]" class="delivery-cfg-delie" value="1" <{if $setData.ome_delivery_split_type == '1' || $setData.ome_delivery_split_type==''}>checked="checked"<{/if}> ><label > 回写第一张</label>&nbsp;&nbsp;<input type="radio" name="set[ome.order.split_type]" class="delivery-cfg-delie" value="2" <{if $setData.ome_delivery_split_type == '2'}>checked="checked"<{/if}> ><label > 回写最后一张</label></td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                                <td width="20">&nbsp;</td>
                                <td width="275" valign="top">

                                </td>
                                <td>&nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>




                <{if $order_num}>
                <tr>
                    <th>&nbsp;</th>
                    <td><h3>拆单未发货订单列表（<span style="color:#ff0000; font-weight:normal;">温馨提示：如需修改"拆单方式"，请先处理完之前的拆分订单！</span>）</h3></td>
                </tr>
                <tr>
                    <th>&nbsp;</th>
                    <td>
                        <div id="split_rule">
                            <table class="gridlist" cellpadding="0,cellspacing=0,border=0">
                                <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>订单号</th>
                                    <th>所属店铺</th>
                                    <th>确认状态</th>
                                    <th>发货状态</th>
                                    <th>订单总额</th>
                                    <th>最后更新</th>
                                    <th>拆单数量</th>
                                    <th>已发货数量</th>
                                </tr>
                                </thead>
                                <tbody>
                                <{foreach from=$order_list item=val key=key}>
                                <tr>
                                    <td><{$val.order_id}></td>
                                    <td><{$val.order_bn}></td>
                                    <td><{$val.shop_name}></td>
                                    <td><{$val.process_status}></td>
                                    <td><{$val.ship_status}></td>
                                    <td style="text-align:left;"><{$val.total_amount|cur}></td>
                                    <td><{$val.last_modified|cdate}></td>
                                    <td><{$val.dly_count}></td>
                                    <td><strong style="color:#ff0000;"><{$val.dly_succ}></strong></td>
                                </tr>
                                <{/foreach}>
                                <tr>
                                    <td colspan="9" style="text-align:right;">共<b style="color:#ff0000;"><{$order_num}></b>条记录，查看更多请到订单列表栏目……&nbsp;&nbsp;</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </td>
                </tr>
                <{/if}>

                <tr>
                    <th>&nbsp;</th>
                    <td style="color:#ff0000;">
                        <span style="font-weight:bold;">常见问题：</span><br />
                        <span style="padding-left:15px;">1、易开店、Ec-store支持回传所有快递号 </span><br />
                        <span style="padding-left:15px;">2、淘宝、天猫、分销王、可按照货号回传快递单号！</span><br />
                        <span style="padding-left:15px;">3、京东等其他平台只能回传一张快递单号。</span><br />

                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <style type="text/css">
        .split_focus { border:1px solid #3367AC; background:#fff; }
        .split_gray { border:1px solid #ccc; background:#efefef; }

        .split_focus strong, .split_gray strong { font-weight:bold; }
        .split_focus a, .split_gray a { color:#0066cc; text-decoration:none; }
        #split_type_1a, #split_type_2a { color:#0066cc; text-decoration:none; }
        #split_rule { width:auto; max-width:800px; }
        #split_rule table { width:800px; }
        #split_rule table td { height:24px; line-height:24px; text-align:center; }
        #split_rule table th { height:26px; line-height:26px; font-weight:bold; text-align:center; }
    </style>
</div>
<script>
    $$('input[name=set[ome.order.split]]').addEvent('click',function(e)
    {
        var value = this.value;
        var order_num	= parseInt('<{$order_num}>');

        if(order_num > 0)
        {
            alert("还有 "+ order_num +" 条部分拆分的订单，请先处理完毕再关闭拆单功能，\n\n否则发货回写 与 生成销售单会出现问题！");
            return false;
        }

        if(value == '1')
        {
            document.getElementById('show_split_setting').style.display	= '';
        }
        else
        {
            document.getElementById('show_split_setting').style.display	= 'none';
        }
    });

    var order_split = $$('input[name=set[ome.order.split]]:checked').get('value');

    if(order_split == '1'){
        $('show_split_setting').setStyle('display','');
    }else{
        $('show_split_setting').setStyle('display','none');
    }

</script>